@tool
class_name RoomSpecialLayerInfo
extends Resource

enum ReplaceType
{
	Scene,
	Tile,
}
@export var enable:bool = true
@export var replace_type:ReplaceType:
	set(value):
		replace_type = value
		notify_property_list_changed()
## 默认值表示不参与过滤
@export var replace_room_tile_info:ReplaceRoomTileInfo
# y值负数表示不作限制
@export var count_range:Vector2i
# 遍历cell是否是打乱后遍历
@export var is_random:bool = true
#region Scene
@export var room_scene_infos:Array[RoomSceneInfo]
#endregion
#region Tile
@export var room_tile_infos:Array[RoomTileInfo]
#endregion

func _validate_property(property: Dictionary) -> void:
	var hide_list = []
	if replace_type == ReplaceType.Scene:
		hide_list.append("room_tile_infos")
	elif replace_type == ReplaceType.Tile:
		hide_list.append("room_scene_infos")
	if property.name in hide_list:
		property.usage = PROPERTY_USAGE_NO_EDITOR
